<template>
  <el-card class="box-card" shadow="never" style="margin: 15px 0px">
    <div v-for="o in 1" :key="o" class="text item">
      {{ todo.Myname + "说"
      }}<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{
        todo.title
      }}
      <template><el-button type="text" @click="open">删除</el-button></template>
    </div>
  </el-card>
</template>

<script>
export default {
  name: "Mylist",
  //声明接收todo对象
  props: ["todo"],

  methods: {
    open() {
      this.$confirm("确定删除Jack的评论吗,", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
      })
        .then(() => {
          this.$message({
            type: "success",
            message: "删除成功!",
          });
        })
        .catch(() => {
          this.$message({
            type: "info",
            message: "已取消删除",
          });
        });
    },
  },
};
</script>

<style scoped>
.text {
  font-size: 14px;
}

.item {
  padding: 18px 0;
}

.box-card {
  width: 500px;
}
</style>